/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.EjercicioTarea.procesos;

import org.jasypt.encryption.pbe.StandardPBEStringEncryptor;

/**
 *
 * @author mario
 */
public class Encriptar {
    
     public static String encriptar(String cadena) {
        StandardPBEStringEncryptor s = new StandardPBEStringEncryptor();
        s.setPassword("INGSISdj63.");
        return s.encrypt(cadena);
    }

    public static String DesEncriptar(String cadena) {

        StandardPBEStringEncryptor s = new StandardPBEStringEncryptor();
        s.setPassword("INGSISdj63.");
        String retorna = null;
        try {
            retorna = s.decrypt(cadena);
        } catch (Exception ex) {
            System.out.println(ex.toString());
        }
        return retorna;
    }
    
}
